package com.dxx.cloud.admin.controller.admin;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.dxx.cloud.admin.constant.CommonConst;
import com.dxx.cloud.admin.module.entity.CustomerSuggestion;
import com.dxx.cloud.admin.service.ICustomerSuggestionService;
import com.dxx.cloud.admin.utils.RequestUtils;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.annotation.Resource;
import org.dromara.common.mybatis.core.page.PageQuery;
import org.dromara.common.mybatis.core.page.TableDataInfo;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author 37048
 */
@RestController
@RequestMapping(CommonConst.RouterPath.ADMIN + "/customerBusinessCooperation")
@Tag(name = "意见反馈模块")
public class CustomerSuggestionController {

    @Resource
    private ICustomerSuggestionService customerSuggestionService;

    @Operation(summary = "意见反馈分页列表")
    @PostMapping("/pageList")
    public TableDataInfo<CustomerSuggestion> pageList(@RequestBody PageQuery request) {
        RequestUtils.parsePageRequest(request);
        final Page<CustomerSuggestion> page = customerSuggestionService.page(new Page<>(request.getPageNum(), request.getPageSize()));
        return TableDataInfo.build(page);
    }
}
